Optimal. Leaf size=55 \[ -\frac {a (A-i B)}{3 c^3 f (i+\tan (e+f x))^3}-\frac {a B}{2 c^3 f (i+\tan (e+f x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {3669, 45}
\begin {gather*} -\frac {a (A-i B)}{3 c^3 f (\tan (e+f x)+i)^3}-\frac {a B}{2 c^3 f (\tan (e+f x)+i)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 3669
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x)) (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^3} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {A+B x}{(c-i c x)^4} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \text {Subst}\left (\int \left (\frac {A-i B}{c^4 (i+x)^4}+\frac {B}{c^4 (i+x)^3}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {a (A-i B)}{3 c^3 f (i+\tan (e+f x))^3}-\frac {a B}{2 c^3 f (i+\tan (e+f x))^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.66, size = 72, normalized size = 1.31 \begin {gather*} \frac {a (-3 i A+2 (-2 i A+B) \cos (2 (e+f x))-2 (A+2 i B) \sin (2 (e+f x))) (\cos (4 (e+f x))+i \sin (4 (e+f x)))}{24 c^3 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.21, size = 43, normalized size = 0.78
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {B}{2 \left (i+\tan \left (f x +e \right )\right )^{2}}-\frac {-i B +A}{3 \left (i+\tan \left (f x +e \right )\right )^{3}}\right )}{f \,c^{3}}\) | \(43\) |
default | \(\frac {a \left (-\frac {B}{2 \left (i+\tan \left (f x +e \right )\right )^{2}}-\frac {-i B +A}{3 \left (i+\tan \left (f x +e \right )\right )^{3}}\right )}{f \,c^{3}}\) | \(43\) |
risch | \(-\frac {a \,{\mathrm e}^{6 i \left (f x +e \right )} B}{24 c^{3} f}-\frac {i a \,{\mathrm e}^{6 i \left (f x +e \right )} A}{24 c^{3} f}-\frac {i a A \,{\mathrm e}^{4 i \left (f x +e \right )}}{8 c^{3} f}+\frac {a \,{\mathrm e}^{2 i \left (f x +e \right )} B}{8 c^{3} f}-\frac {i a \,{\mathrm e}^{2 i \left (f x +e \right )} A}{8 c^{3} f}\) | \(100\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 5.66, size = 62, normalized size = 1.13 \begin {gather*} \frac {{\left (-i \, A - B\right )} a e^{\left (6 i \, f x + 6 i \, e\right )} - 3 i \, A a e^{\left (4 i \, f x + 4 i \, e\right )} - 3 \, {\left (i \, A - B\right )} a e^{\left (2 i \, f x + 2 i \, e\right )}}{24 \, c^{3} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 201 vs. \(2 (44) = 88\).
time = 0.26, size = 201, normalized size = 3.65 \begin {gather*} \begin {cases} \frac {- 192 i A a c^{6} f^{2} e^{4 i e} e^{4 i f x} + \left (- 192 i A a c^{6} f^{2} e^{2 i e} + 192 B a c^{6} f^{2} e^{2 i e}\right ) e^{2 i f x} + \left (- 64 i A a c^{6} f^{2} e^{6 i e} - 64 B a c^{6} f^{2} e^{6 i e}\right ) e^{6 i f x}}{1536 c^{9} f^{3}} & \text {for}\: c^{9} f^{3} \neq 0 \\\frac {x \left (A a e^{6 i e} + 2 A a e^{4 i e} + A a e^{2 i e} - i B a e^{6 i e} + i B a e^{2 i e}\right )}{4 c^{3}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 149 vs. \(2 (47) = 94\).
time = 0.73, size = 149, normalized size = 2.71 \begin {gather*} -\frac {2 \, {\left (3 \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 6 i \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 3 \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 10 \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 2 i \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 6 i \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 3 \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 3 \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{3 \, c^{3} f {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.63, size = 63, normalized size = 1.15 \begin {gather*} \frac {\frac {a\,\left (2\,A+B\,1{}\mathrm {i}\right )}{6}+\frac {B\,a\,\mathrm {tan}\left (e+f\,x\right )}{2}}{c^3\,f\,\left (-{\mathrm {tan}\left (e+f\,x\right )}^3-{\mathrm {tan}\left (e+f\,x\right )}^2\,3{}\mathrm {i}+3\,\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________